Skip to content

chore(repositories): Dual write to the new ProjectRepository table when we create related rows in other tables#115346

Merged
wedamija merged 2 commits into
masterfrom
danf/repository-project-dual-write
May 12, 2026
Merged

chore(repositories): Dual write to the new ProjectRepository table when we create related rows in other tables#115346
wedamija merged 2 commits into
masterfrom
danf/repository-project-dual-write

Conversation

@wedamija
Copy link
Copy Markdown
Member

When creating RepositoryProjectPathConfig and RepositoryProjectPathConfig rows, we now dual write to ProjectRepository and store the id in the fk column.

@wedamija wedamija requested review from a team as code owners May 11, 2026 22:42
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 11, 2026
Comment thread src/sentry/integrations/api/endpoints/organization_code_mappings.py
@wedamija wedamija requested a review from a team May 11, 2026 23:24
@wedamija wedamija force-pushed the danf/repository-project-link branch from 8312052 to 9fdecb2 Compare May 11, 2026 23:57
@wedamija wedamija requested review from a team as code owners May 11, 2026 23:57
@wedamija wedamija force-pushed the danf/repository-project-dual-write branch from 2ae8d91 to 2d2ee38 Compare May 11, 2026 23:59
Base automatically changed from danf/repository-project-link to master May 12, 2026 16:42
@wedamija wedamija changed the title chore(repositories): Dual write to the new ProjectRepository table when created related rows in other tables chore(repositories): Dual write to the new ProjectRepository table when we create related rows in other tables May 12, 2026
…when created related rows in other tables

When creating `RepositoryProjectPathConfig` and `RepositoryProjectPathConfig` rows, we now dual write to `ProjectRepository` and store the id in the fk column.
@wedamija wedamija force-pushed the danf/repository-project-dual-write branch from 2d2ee38 to 41e1be6 Compare May 12, 2026 16:44
The serializer update() method was not updating the project_repository
FK when project_id or repository_id changed, which could lead to
cascade deletion if the old ProjectRepository was removed.
@wedamija wedamija merged commit eebb671 into master May 12, 2026
70 checks passed
@wedamija wedamija deleted the danf/repository-project-dual-write branch May 12, 2026 17:08
nikkikapadia pushed a commit that referenced this pull request May 12, 2026
…when we create related rows in other tables (#115346)

When creating `RepositoryProjectPathConfig` and `RepositoryProjectPathConfig` rows, we now dual write to `ProjectRepository` and store the id in the fk column.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants